package com.sgb.kjwl.model.entity;

import com.google.gson.annotations.SerializedName;
import com.sgb.kjwl.view.event.CustomViewsInfo;

import java.util.ArrayList;
import java.util.List;

/**
 * 机械详情Entity
 */
public class MachineDetailEntity {

    private String id;
    private String brandName;
    private String contactNumber;
    private String contacts;
    private String describe;
    private String district;
    @SerializedName(value = "factoryYear")
    private String factoryYear;
    private String modelName;
    private String pictures;
    @SerializedName(value = "priceUnit", alternate = {"priceUnitName"})
    private String priceUnit;
    private String rentalPrice;
    private String introduction;
    private String title;
    @SerializedName(value = "updateTime", alternate = {"createTime"})
    private String updateTime;
    private String useHour;
    private int negotiable;
    @SerializedName(value = "attrs", alternate = {"attributeList"})
    private List<AttrsBean> attrs;

    @SerializedName(value = "addressDetail", alternate = {"taskAddr"})
    private String addressDetail;
    //    private String mechanicalType;
    private String provinceNo;
    private String provinceName;//省
    private String cityNo;
    private String cityName;//市
    private String areaNo;
    private String areaName;//区
    private String typeName;//机械类型
    private String brandNo;//品牌
    private String modelNo;//出厂型号
    private String latitude;//纬度
    private String longitude;//经度
    private String driver;//是否自带驾驶员 1 是  0 否
    private String workStartTime;//可工作开始时间 时间戳
    private String workEndTime;//可工作结束时间 时间戳
    private String customerServiceId;//客服id
    private String customerServiceName;//客服名字
    private String imAccount;//IM参数
    private String needInvoice;//否开具发票(0不需要，1需要)
    private String invoiceType;//发票类型（0普通发票，1专用发票）
    private String tariff;//税率

    private String mechanicalType;
    private String companyId;//公司id
    private String companyNo;//公司no
    private String companyName;//公司名称
    private String createsuerNo;//创建者no

    private String status;//上下架状态

    private String driverAge;// 驾驶员年龄
    private String drivingAge;//驾龄
    private String repairRemake;// 维修说明
    private String fuelRemake;//燃油说明

    public String getDriverAge() {
        return driverAge;
    }

    public void setDriverAge(String driverAge) {
        this.driverAge = driverAge;
    }

    public String getDrivingAge() {
        return drivingAge;
    }

    public void setDrivingAge(String drivingAge) {
        this.drivingAge = drivingAge;
    }

    public String getRepairRemake() {
        return repairRemake;
    }

    public void setRepairRemake(String repairRemake) {
        this.repairRemake = repairRemake;
    }

    public String getFuelRemake() {
        return fuelRemake;
    }

    public void setFuelRemake(String fuelRemake) {
        this.fuelRemake = fuelRemake;
    }

    public String getCompanyId() {
        return companyId;
    }

    public void setCompanyId(String companyId) {
        this.companyId = companyId;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCreatesuerNo() {
        return createsuerNo;
    }

    public void setCreatesuerNo(String createsuerNo) {
        this.createsuerNo = createsuerNo;
    }

    public String getDistrict() {
        return district;
    }

    public void setDistrict(String district) {
        this.district = district;
    }

    public String getMechanicalType() {
        return mechanicalType;
    }

    public void setMechanicalType(String mechanicalType) {
        this.mechanicalType = mechanicalType;
    }

    public String getTariff() {
        return tariff;
    }

    public void setTariff(String tariff) {
        this.tariff = tariff;
    }

    public String getProvinceNo() {
        return provinceNo;
    }

    public void setProvinceNo(String provinceNo) {
        this.provinceNo = provinceNo;
    }

    public String getProvinceName() {
        return provinceName;
    }

    public void setProvinceName(String provinceName) {
        this.provinceName = provinceName;
    }

    public String getCityNo() {
        return cityNo;
    }

    public void setCityNo(String cityNo) {
        this.cityNo = cityNo;
    }

    public String getCityName() {
        return cityName;
    }

    public void setCityName(String cityName) {
        this.cityName = cityName;
    }

    public String getAreaNo() {
        return areaNo;
    }

    public void setAreaNo(String areaNo) {
        this.areaNo = areaNo;
    }

    public String getAreaName() {
        return areaName;
    }

    public void setAreaName(String areaName) {
        this.areaName = areaName;
    }

    public String getTypeName() {
        return typeName;
    }

    public void setTypeName(String typeName) {
        this.typeName = typeName;
    }

    public String getBrandNo() {
        return brandNo;
    }

    public void setBrandNo(String brandNo) {
        this.brandNo = brandNo;
    }

    public String getModelNo() {
        return modelNo;
    }

    public void setModelNo(String modelNo) {
        this.modelNo = modelNo;
    }

    public String getLatitude() {
        return latitude;
    }

    public void setLatitude(String latitude) {
        this.latitude = latitude;
    }

    public String getLongitude() {
        return longitude;
    }

    public void setLongitude(String longitude) {
        this.longitude = longitude;
    }

    public String getWorkStartTime() {
        return workStartTime;
    }

    public void setWorkStartTime(String workStartTime) {
        this.workStartTime = workStartTime;
    }

    public String getWorkEndTime() {
        return workEndTime;
    }

    public void setWorkEndTime(String workEndTime) {
        this.workEndTime = workEndTime;
    }

    public String getCustomerServiceId() {
        return customerServiceId;
    }

    public void setCustomerServiceId(String customerServiceId) {
        this.customerServiceId = customerServiceId;
    }

    public String getCustomerServiceName() {
        return customerServiceName;
    }

    public void setCustomerServiceName(String customerServiceName) {
        this.customerServiceName = customerServiceName;
    }

    public String getImAccount() {
        return imAccount;
    }

    public void setImAccount(String imAccount) {
        this.imAccount = imAccount;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getAddressDetail() {
        return addressDetail;
    }

    public void setAddressDetail(String addressDetail) {
        this.addressDetail = addressDetail;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    //    public String getMechanicalType() {
//        return mechanicalType;
//    }
//
//    public void setMechanicalType(String mechanicalType) {
//        this.mechanicalType = mechanicalType;
//    }

    public int getNegotiable() {
        return negotiable;
    }

    public void setNegotiable(int negotiable) {
        this.negotiable = negotiable;
    }

    public String getIntroduction() {
        return introduction;
    }

    public void setIntroduction(String introduction) {
        this.introduction = introduction;
    }

    public String getBrandName() {
        return brandName;
    }

    public void setBrandName(String brandName) {
        this.brandName = brandName;
    }

    public String getContactNumber() {
        return contactNumber;
    }

    public void setContactNumber(String contactNumber) {
        this.contactNumber = contactNumber;
    }

    public String getContacts() {
        return contacts;
    }

    public void setContacts(String contacts) {
        this.contacts = contacts;
    }

    public String getDescribe() {
        return describe;
    }

    public void setDescribe(String describe) {
        this.describe = describe;
    }

    public String getDriver() {
        return driver;
    }

    public void setDriver(String driver) {
        this.driver = driver;
    }

    public String getFactoryYear() {
        return factoryYear;
    }

    public void setFactoryYear(String factoryYear) {
        this.factoryYear = factoryYear;
    }

    public String getModelName() {
        return modelName;
    }

    public void setModelName(String modelName) {
        this.modelName = modelName;
    }

    public ArrayList<CustomViewsInfo> getPictures() {
        if (pictures == null)
            return null;
        String[] split = pictures.split(",");
        ArrayList<CustomViewsInfo> strings = new ArrayList<>();
        for (int i = 0; i < split.length; i++) {
            strings.add(new CustomViewsInfo(split[i]));
        }
        return strings;
    }

    public void setPictures(String pictures) {
        this.pictures = pictures;
    }

    public String getPriceUnit() {
        return priceUnit;
    }

    public void setPriceUnit(String priceUnit) {
        this.priceUnit = priceUnit;
    }

    public String getRentalPrice() {
        return rentalPrice;
    }

    public void setRentalPrice(String rentalPrice) {
        this.rentalPrice = rentalPrice;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }

    public String getUseHour() {
        return useHour;
    }

    public void setUseHour(String useHour) {
        this.useHour = useHour;
    }

    public List<AttrsBean> getAttrs() {
        return attrs;
    }

    public void setAttrs(List<AttrsBean> attrs) {
        this.attrs = attrs;
    }

    public String getNeedInvoice() {
        return needInvoice;
    }

    public void setNeedInvoice(String needInvoice) {
        this.needInvoice = needInvoice;
    }

    public String getInvoiceType() {
        return invoiceType;
    }

    public void setInvoiceType(String invoiceType) {
        this.invoiceType = invoiceType;
    }

    public static class AttrsBean {
        /**
         * key : 1
         * name : 罐体容积
         * no : 201906215949574
         * unit : m³
         * val : 14
         */
        @SerializedName(value = "key", alternate = {"attrKey"})
        private String key;
        private String name;
        @SerializedName(value = "no", alternate = {"attributeNo"})
        private String no;
        private String unit;
        private String val;

        public String getKey() {
            return key;
        }

        public void setKey(String key) {
            this.key = key;
        }

        public String getName() {
            return name;
        }

        public void setName(String name) {
            this.name = name;
        }

        public String getNo() {
            return no;
        }

        public void setNo(String no) {
            this.no = no;
        }

        public String getUnit() {
            return unit;
        }

        public void setUnit(String unit) {
            this.unit = unit;
        }

        public String getVal() {
            return val;
        }

        public void setVal(String val) {
            this.val = val;
        }
    }
}
